package com.xiaoxi.factroymethodmode.product;

import com.xiaoxi.factroymethodmode.product.Product;
import lombok.Data;

import java.util.UUID;

/**
 * @ClassName IDCard
 * @Description
 * @Author xiaoxi
 * @Date 2023/3/9 22:43
 * @Version 1.0
 */
@Data
public class IDCardProduct implements Product {

    private String owner;
    private String uuid;

    public IDCardProduct(String owner) {
        this.uuid = String.valueOf(UUID.randomUUID());
        this.owner = owner;
        System.out.println("正在制作：" + owner + "(" + uuid + ")的ID卡");
    }

    @Override
    public void use() {
        System.out.println("正在使用：" + owner + "(" + uuid + " ) 的ID卡");
    }

}
